package me.helllp.book.netty.step00;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;
import java.net.UnknownHostException;

public class TimeClient {
	public static void main(String[] args) throws UnknownHostException, IOException {
		Socket s = new Socket("localhost",7000);
		
		BufferedReader in = new BufferedReader(new InputStreamReader(s.getInputStream()));
		PrintWriter out = new PrintWriter(s.getOutputStream(),true);
		
		out.println("TIME");
		String read = in.readLine();
		
		System.out.println("服务器时间：" + read);
		
		out.println("ddd");
		read = in.readLine();
		
		System.out.println("服务器时间：" + read);
		
		in.close();
		out.close();
		s.close();
	}
}
